package com.yinxin.lambda;

/**
 * @author yinxin
 * @Title:
 * @Package
 * @Description:
 * @date 2022/1/711:13
 */
public class TestLambda {
    //2、实现类
    static class Like implements Ilike {
        @Override
        public void lambda() {
            System.out.println("I like lambda");
        }
    }
    public static void main(String[] args) {
        class Like implements Ilike {
            @Override
            public void lambda() {
                System.out.println("I like lambda");
            }
        }
        Like like = new Like();
        like.lambda();
    }


}
//1、定义一个函数式接口
interface Ilike{
    void lambda();
}

//2、实现类
class Like implements Ilike {
    @Override
    public void lambda() {
        System.out.println("I like lambda");
    }
}